<div>
    <Checkbox Indeterminate="@indeterminate" Checked="@checkAll" CheckedChange="@CheckAllChanged">
    Check all
    </Checkbox>
    <br />
    <AntDesign.CheckboxGroup Options="@ckeckAllOptions" ValueChanged="@OnChanged"/>
</div>

@code{

    static CheckboxOption[] ckeckAllOptions = new CheckboxOption[]{
        new CheckboxOption{ Label="Apple",Value="Apple" ,Checked=true},
        new CheckboxOption{ Label="Pear", Value="Pear" },
        new CheckboxOption{ Label="Orange", Value="Orange",Checked=true },
    };

    void CheckAllChanged()
    {
        bool allChecked = checkAll;
        ckeckAllOptions.ForEach(o => o.Checked = !allChecked);
    }

    void OnChanged()
    {

    }

    bool indeterminate => ckeckAllOptions.Count(o => o.Checked) > 0 && ckeckAllOptions.Count(o => o.Checked) < ckeckAllOptions.Count();

    bool checkAll => ckeckAllOptions.All(o => o.Checked);

}